Houdini 13.0 Reference Windows

The type properties window lets you set up the options and parameters of a digital asset (see how to create a digital asset ). As you develop an asset, you will use the controls in this window a great deal, mostly as you refine the interface using the Parameters tab.

To...Do this
Open the type properties window
  • In a network editor or tree view , press RMB on a digital asset node and choose Type Properties.

  • In the operator type manager window , press RMB on the digital asset definition and choose Type Properties. In this case you are accessing the stored definition, which will not show any unaccepted changes you may have made to asset instances you have placed in your scene.

Import/promote parameters from another node onto this node’s UI

See importing parameters below.

Save changes to the asset definition
  • Click Apply to save all the current changes into the operator type library specified in the Save To Library field.

  • Click Accept to save the operator definition to the library and close the window.

Discard any changes since the last apply
  • Click Discard to undo any changes you have made.

  • Click Cancel to undo any changes and close the window.

Note

This window must be open to accept or apply any changes you have made to an asset. Even if you add an operator or make a new network connection, you must open up the Operator Type Properties panel and click Accept or Apply to update the asset’s definition.

How to import parameters from another node

You can build the UI of your asset by promoting parameters from nodes inside the asset’s network.

To...Do this
Promote individual or small groups of parameters
  • Drag the parameter from a parameter showing the other node’s parameters into the Existing Parameters tree (on the Parameters tab) of the type properties window.

    or

  • On the Parameters tab, under Create Parameters, click From nodes. Find the parameter(s) in the tree and drag them into the Existing Parameters tree.

To promote all the entire contents of a tab (folder) on another node

Basic tab

Note

The Name, Label, Min inputs, Max inputs, and Install library to controls are the same as in the create digital asset dialog used to create the digital asset.

Version

The operator type version string. This can be any text string. You can use a simple incrementing integer like “016” or more point number strings like “1.0.23”. When a node is saved, its operator type version string is saved along with it. Then when it is loaded again, the saved version is compared with the current operator type’s version. If they are different, then the Upgrade Loaded Parameters event handler script is invoked. See the event handler description for more details.

Icon

Internal name, file path, or URL of the icon to use for the shelf item. Click the chooser button at the right end of the field to choose a file. Note that you can choose a file contained in a digital asset (click opdef: on the left side of the file chooser).

If you don’t supply an absolute path or URL, Houdini will look for the icon using the path in the $HOUDINI_UI_ICON_PATH environment variable.

You can use any an SVG file or any image format Houdini supports (such as PNG or .pic). The icon image should be square.

Houdini ships with a number of stock SVG icons. You can see bitmap representations of these icons in $HFS/mozilla/documents/icons/large. To specify a stock icon, use the form dirname_filename, where...

  • dirname is the directory name under $HFS/mozilla/documents/icons/large, such as OBJ, SHELF, or MISC, and

  • filename is the icon’s filename minus any extension. For example, OBJ_sticky specifies the standard icon for the Sticky object.

Note

All the icons are cached in memory once they've been loaded, so you have to restart Houdini to refresh them.

Representative Node

For object assets, this lets you choose a node from inside the asset that represents the general type of node you want the asset to be.

For example, if you are making a camera asset, choose a camera node inside your asset to indicate that the asset acts like a camera. Similarly, if you are making a light asset, choose a light node.

Houdini may use this information to filter and categorize your asset in the interface, such as in the link editor.

Editable Nodes

Nodes in this field can be edited even if the digital asset is locked. You can drag and drop a node into this field; however, if you want to add more than one, you must type them in and separate them by spaces or commas.

Message Nodes

Any messages or warnings posted on these nodes will be propagated to the top level node.

Dive Target

If there are editable nodes, then you may want the end user to jump directly inside one of those nodes. This specifies which node to jump directly inside of when the asset is locked, which makes it feel like the node directly contains the dive target.

Note

Users can still get to the sibling nodes using tree views, etc. Only the enter/up commands are affected.

Descriptive Parm

If this is non-empty, the named parameter’s value will be drawn beside the node name in the network view.

Shader Name

(SHOPs only) The name of the shader.

Render Mask

(SHOPs only) A space separated list of render types supported by this shader.

VopNet Mask

(VOPs only) A space separated list of VOP network types supported by this VOP. Leave this field empty if the operator supports all network types. Valid types are: surface, displace, light, shadow, fog, chop, pop, sop, cop2, image3d, cvex

Unit Length

The length in meters of one asset unit as used by default values and any embedded nodes. This value is used in combination with the HIP file unit length to scale parameters tagged as being affected by unit length.

Unit Mass

The mass in kilograms of one asset unit as used by default values and any embedded nodes. This value is used in combination with the HIP file unit mass to scale parameters tagged as being affected by unit mass.

Parameter Options
Get Properties from Vex Code

Generate most properties of the operator from pragma statements in the VEX source code.

Save Information from Node
Save Initial Contents and Parameters

When this option is on, the parameter values and contents of any nodes referenced by the digital asset are saved as part of the asset’s definition.

Save Defaults as Initial Parameters

Use the default values of the original parameters as the initial values for new nodes, instead of their current values.

Save Spare Parameters

Save the spare parameter definition from the node in to the creation script for the asset. This will cause any new instances of this asset to have the same spare parameters.

Save Contents as Locked
New nodes will be created with their contents locked. Unlock New Nodes on Creation

New nodes will be created unlocked. Do not turn this on for an asset in production.

Compress Contents

Use compression on the data saved for the asset definition to reduce the size of the .otl file. This will slightly decrease the speed of working with the OTL.

Check for External Node References

Change all absolute node references inside the digital asset to relative references.

Save Cached Code

When this checkbox is turned on, Houdini saves compiled VEX code inside the HDA and uses it instead of generating that code from the node network.

Currently, it applies mainly to the Shader Builder SHOPs, which contain VOP nodes. Traditionally Houdini would use nodes to generate .vfl source code and then compile it to vex. By using the cached vex code, Houdini saves time, which can be quite substantial for complex shaders. Also, the synched HDA nodes don’t need to create child nodes to build the VOP network inside them (since they are not needed to generate code), so time is saved by skipping the creation of node network when loading hip files.

Parameters tab

  • To promote parameters from inside the asset up to the asset’s UI, drag the parameter into the list on the left. Drag a node from the network editor to add all its parameters.

  • To create a new parameter from scratch, choose a parameter type from the menu above the list on the left.

  • To organize the parameters into tabs, use the menu above the list on the left to create “folders”.

  • Drag and drop parameters into the folders to reorder them and organize them inside folders.

Parameter Description: folders

Folder type

Controls how the folder contents are presented in the asset’s parameter editor interface for parameter folders. The default is to show the folder as a tab.

The Import block setting displays the contents inline. This is useful when you want to import a folder from a sub-node (see Import settings below) but don’t want the imported contents to appear in their own tab.

Name

Internal name of the folder which cannot contain spaces.

Label

Readable label for the folder, displayed in the interface. This name can contain spaces.

Default

Default values for multi-parms.

Available for import

This is useful when you are importing the node’s parameters but you want this folder to not be imported.

Invisible

This folder and its contents are not visible in the parameter interface, they are only available for scripting.

End tab group

Consecutive folders of type Tabs are turned into a set of tabs. If you want to separate a set of consecutive tab folders into two or more sets of tabs, turn this option on for the last tab of a set of tabs. The next folder of type Tabs will start a new set of tabs.

Tab Hide When

Specifies conditional rules for when to hide this tab or radio folder.

Group Hide When

Specifies conditional rules for when to hide all tab or radio folders of the current group. This setting can only be used on the first folder of the group.

Import settings

Turn this on have this folder import its contents from a folder on a node inside this asset.

Note

You still need to open the operator type properties window’s Gear menu and choose Refresh imports to actually import or re-import the parameters.

Source

The source to import from. The source can be either a sub-node, specified using op:<node_path>, or an external dialog script, specified using file:<file_path>. For example, to import parameters from a node named torus1 inside the asset, use op:torus1. To import from a node named sphere1 inside an object named geo1 inside the asset, use op:geo1/sphere1.

Token

The entity to import from the source. You can import either a group of folders, a single folder, an import block, or all the parameters from the source.

To import a group of folders, use the Name of that set of folders. To import a single folder, use the Name of the folder, followed by a colon (:), followed by the Label of the folder you want to import. For example, to import a folder named folder1 with the label Shading, the token would be folder1:Shading. To import an import block, use the special token importblock, followed by a colon (:), followed by the Label of the import block you want to import. Finally, to import all the parameters from the source, leave the token blank.

You can obtain the name of a folder by selecting the sub-node and choosing Edit Parameter Interface from the Gear menu in the parameter editor. Alternatively, you can also find the desired folder in the From Nodes tree and MMB on it.

Mask

Only import parameters matching this mask.

Note that excluding a multiparm will not automatically exclude any existing instances. However, including a multiparm will exclude these individual instances as they are represented by templates of the multiparm.

Parameter Description: ramps

Name

The internal name of the parameter. You will use this name to refer to the parameter’s value in expressions. It must be unique within this operator type. This name cannot contain spaces or slashes.

Label

A readable label for the parameter. This name can contain spaces.

Ramp Type

The data type this ramp parameter contains. This can either be RGB for colors, or Float for scalar values.

Default Points

The initial number of ramp points when this parameter is created.

Def Interpolation

The default interpolation type for ramp points.

First Instance

Specifies the starting number associated with the first ramp point. This only affects scripting, which refers to the internal names of the ramp point parameters.

Disable When

Specifies conditional rules for when to disable the ramp parameter.

Hide When

Specifies conditional rules for when to hide the ramp parameter.

Show Parm In

The dialogs in which the parameter will appear.

Main dialog

Parameter appears in the parameter editor pane.

Main & tool dialogs

Parameter appears in:

  • The parameter editor pane.

  • The mini-parameter editor that appears when the user presses P while the operator is active.

Main & tool dialogs + toolbox

Parameter appears in:

  • The parameter editor pane.

  • The mini-parameter editor that appears when the user presses P while the operator is active.

  • The operation controls toolbar (at the top of the viewer pane) when the operator is active. Pane > Toolbars and controls > Operation controls).

Show Controls By Default

If enabled, the ramp controls panel will be open by default in Parameter dialogs.

Available for import

Whether this parameter is imported by import folders on a parent asset. See about importing folders from a sub-node above.

VEX Ramp Variables

Specifies the VEX variable names when used in a shader for the basis, keys, and values parameters.

Parameter Description: Parameter subtab

Name

The internal name of the parameter. You will use this name to refer to the parameter’s value in expressions. It must be unique within this operator type. This name cannot contain spaces or slashes.

Label

A readable label for the parameter. This name can contain spaces.

Turn off the associated checkbox to hide the label. This is especially useful when you lay out parameters side-by-side using the Horizontally join to next parameter option.

Type

The data type this parameter contains.

Angle

A 2D angle (in degrees). You can increase the Size to store up to four angles in a single parameter. Use Direction vector for a 3D direction vector.

Button

An action button. Clicking the button runs the Callback script (see below).

Color

An RGB color. Houdini provides a color swatch/picker UI.

Color and Alpha

An RGBA color. Houdini provides a color swatch/picker UI.

Direction Vector

A vector that represents a direction in 3D space.

File

A path to a file. Houdini provides a file picker UI for the parameter. If this parameter specifies an image file or geometry file, use the more specific datatypes below to have the file picker only show the specific file types.

File - Geometry

A path to a geometry file. Houdini provides a file picker UI that shows geometry files.

File - Image

A path to an image file. Houdini provides a file picker UI that shows image files.

Float

A number with a decimal part.

Float Vector 2, 3, 4

A float vector of two, three, or four components.

Check the rest of the menu for more specific datatypes that might match what you want to store in a vector (such as an RGB color). The more specific datatypes store their values as a vector, but provide extra UI for setting the value (such as a color swatch and color picker for colors).

Folder

A parameter for containing other parameters. See also the folder description below.

Integer

A whole number.

Integer Vector 2, 3, 4

An integer vector of two, three, or four components.

Label

A parameter for providing a read-only label.

Operator List

A space-separated list of node paths. Houdini provides a node picker UI that accepts multiple selections. Use the Op filter option below to restrict this parameter to show certain types of nodes.

Operator Path

A path to a node. Houdini provides a node picker UI. Use the Op filter option below to restrict this parameter to show certain types of nodes.

Ordered Menu

A pop-up menu. See the menu subtab for how to edit the menu items.

RGBA Mask

A channel mask for an RGBA color. Houdini provides a UI that lets you choose the Red, Green, Blue channels, all Color channels (R, G, and B), and/or the Alpha channel.

Ramp (Float)

A ramp parameter for editing curves. To evaluate ramp parameters from scripting, see chramp().

Ramp (RGB)

A ramp parameter for editing color values. To evaluate ramp parameters from scripting, see chramp().

Separator

A horizontal separator.

String

A text string.

Check the rest of the menu for more specific datatypes that might match what you want to store in a string (such as an file path). The more specific datatypes store their values as a string, but provide extra UI for setting the value (such as a file picker for image files).

Toggle

A checkbox. When you read the parameter with ch this will return 0 for off and 1 for on.

UV/UVW

UV or UVW texture coordinates.

Op filter

When Type is Operator path or Operator list, this option lets you restrict the types of nodes shown in the picker UI. For example, if this parameter should contain a surface shader, set Op filter to SHOP: Surface only. This makes it easier for users to pick surface shader by filtering out other node types from the picker.

RMan type

For RenderMan Shader assets, this lets you set the RenderMan datatype to use for this parameter in the output.

Browse Mode
Read and Write

Opens the chooser in an intermediate mode, if possible.

Read Only

Opens the chooser in the open file mode.

Write Only

Opens the chooser in save file mode.

Houdini’s file chooser only recognizes the Read and Write mode and is used for opening files for all three options.

The OS X only recognizes the Read Only and Write Only modes, and fakes the Read and Write mode (needed by Data File DOP, for example) by using Write Only mode. In this mode you cannot create a new file; however, using Write Only mode is still better than Read Only, since Read Only mode presents existing files as not selectable.

On Linux and Windows, you are limited to Houdini’s browser.

Note

The environment variable HOUDINI_USE_NATIVE_FILE_CHOOSER lets you customize Houdini to choose to use the native file browsers or to use Houdini's.

Units

Specifies a unit type for this parameter’s value, using the format m/kg/sexponent[m/kg/sexponent ...]. For example, length would be m1. Acceleration would be m1s-2 (that is, meters/seconds2, using a negative exponent instead of division). Leave the field blank if this parameter’s default value should not be scaled according to the HIP file’s units.

This tells Houdini whether/how to scale the parameter’s default value when the user changes the HIP file’s units. For example, if the user changes the HIP file’s units to cm, it will use this parameter to scale any defaults that incorporate length, using the specified exponent.

Here are some useful unit type specifications:

Masskg1
Times1
Velocitym1s-1
Angular velocitys-1
Accelerationm1s-2
Angular accelerations-2
Forcekg1m1s-2
Force densitykg1m-2s-2
Impulsekg1m1s-1
Torquekg1m2s-2
Dragkg1s-1
Angular dragkg1m2s-1
Pressurekg1m-1s-2
Spring constantkg1s-2
Linear densitykg1m-1
Area densitykg1m-2
Volume densitykg1m-3
Multi-line String

When Type is String, you can change the string field from a single-line field to a multi-line editor. This can be convenient, if the field requires multiple lines of input, such as a Python script , so you don’t need to go into the expression editor.

Lines to Show

This value controls how many lines should be visible in the multi-line editor.

Language

This menu can be used to set specific syntax highlighting and auto-completion for the multi-line editor.

Size

When Type is Integer, Float, or Angle, sets the number of components in the parameter (1 to 4).

Defaults

The default value for the parameter. If Size is greater than 1, a default can be specified for each component.

Invisible

Do not show this parameter in the asset’s user interface.

Horizontally join to next parameter

If there are two short, related parameters stacked in the interface, this option can be turned on to lay out the options side-by-side to save space and clarify their relationship.

Range

For numeric datatypes, specifies the range for the slider in the interface.

Click the lock icons to lock/unlock the low and high limits. When a limit is unlocked, the slider uses the limit, but the user can enter values beyond the limit using the text entry box. When a limit is locked, the slider uses the limit, and Houdini prevents the user from entering values beyond the limit.

Callback script

HScript or Python script to run when this parameter is changed by a UI event (or when the button is clicked, if Type is Button).

If your script is written in HScript, the name of the changed parameter is available in $script_parm, and the value is in $script_value. If the parameter has multiple components, you can access them as $script_value0, $script_value1, and so on.

If your script is written in Python, the same variables are accessible via a dictionary variable named kwargs. See Parameter Callback Scripts for more information.

For example, this HScript callback command would open a small window showing the path to the operator and the name of the parameter plus the new value:

message `oppwf()`/$script_parm = $script_value0

Often, you will call a script stored as a section (an embedded file) in a digital asset. For an object type named asset_name, you can run the script in the section named section_name using the following command as the callback:

source opdef:/Object/asset_name?section_name

See how to access the contents of an asset and the source command.

Script language

The scripting language to use to interpret the Callback script. Change this language by clicking on the menu to the right of the callback script text box.

Suppress Quotes in VOP Code Blocks

Whether this parameter should be expanded without quotes within VOP code blocks. A common use is to allow strings from menus to be placed verbatim in a code block. Only available for string parameters in a VOP definition.

Available for import

Whether this parameter is imported by import folders on a parent asset. See about importing folders from a sub-node above.

Show parm in

The dialogs in which the parameter will appear.

Main dialog

Parameter appears in the parameter editor pane.

Main & tool dialogs

Parameter appears in:

  • The parameter editor pane.

  • The mini-parameter editor that appears when the user presses P while the operator is active.

Main & tool dialogs + toolbox

Parameter appears in:

  • The parameter editor pane.

  • The mini-parameter editor that appears when the user presses P while the operator is active.

  • The operation controls toolbar (at the top of the viewer pane) when the operator is active. Pane > Toolbars and controls > Operation controls).

Disable When

Specifies conditional rules for when to disable the parameter.

Hide When

Specifies conditional rules for when to hide the parameter.

Help

Help string for the parameter. This is displayed in the tool tip when the user hovers over this parameter in the parameter editor.

Parameter Description: Channels subtab

This subtab lists the parameter’s channels (that is, the animatable components of the parameter). For example, the Translate parameter of an object (internal name t) has three animatable components (representing X, Y, and Z).

For numeric components, you can turn on auto-scope. Then this option is enabled for a component, that component is automatically scoped (displayed in the channel editor) when the parent node is selected. Turn this option on for all commonly animated values to make them easier to work with in the channel list.

If you imported or promoted parameters from another node (by dragging them into the type properties window from a parameter editor, or by using the Create parameters From Nodes subtab), the right hand column shows which channel each channel is linked to on the other node. When the Enable linking button is on, the channel gets its value from the linked channel.

Parameter Description: Import subtab

Placeholder for information about where imported parameters came from. See information about importing folders from a sub-node above.

You should only turn on Save import information if you have some reason for wanting to save the import source of a parameter not in an imported folder.

Parameter Description: Conditionals

Certain parameter types can have one or mode conditionals set on them. These conditionals can specify, for example, when a parameter is disabled, or when it is hidden.

The syntax of the conditional is:

{ parm_name operator value ...} ...

That is, one or more sets of comparisons inside curly braces. Inside the curly braces are one or more comparisons between a parameter and a value, where the operator is one of:

== equal
!= not equal
< less than
> greater than
>= greater than or equal
<= less than or equal

If all of the conditions are true inside any of the curly brace lists, the entire conditional applies and the parameter is either disabled or hidden, depending on application.

Note

It’s important to ensure that there’s space before and after the operator. Otherwise, the conditional is rejected.

Example conditional with multiple brace lists:

{ type == 1 count > 10 } { tolerance < 0.1 }

The conditional will apply to the parameter if...

  • The type parameter equals 1 and the count parameter is

    greater than 10

    or

  • The tolerance parameter is less than 0.1.

You can omit the operator, in which case it’s assumed to be == (equals). For example,

{ type 1 } { type 2 }

will apply the conditional to the parameter if type equals 1 or 2.

It’s not possible to use use expressions in the conditional rules. A workaround is to create an invisible parameter containing the expression needed, and reference it in the appropriate conditional rule.

Help tab

The contents of the text field appear in the help browser when the user clicks the help button for a node of this operator type in the parameter editor.

This help can be HTML, or you can use a simple but powerful wiki format to create documentation that looks like the native Houdini help. See how to write wiki-format help.

Handles tab

The controls on this tab let you create a user interface for the operator by creating manipulators whose handles are bound to parameters inside the asset. These handles become available in the Viewer pane when the asset is selected using the Pose or object tools.

The controls in this pane are the same as for the Persistent manipulator editor.

Code tab

This tab lets you create and edit code used to implement Python surface nodes, VEX shaders, VOP operators, and other code-based operators.

Scripts tab

This tab lets you store scripts that are triggered by asset events (such as when an instance of the asset is created or deleted), as well as arbitrary scripts and Python modules needed by the asset. The interface is very similar to the Extra files tab, but includes a pop-up menu for specifying event scripts.

A script created under PreFirstCreate script will not work when you are creating the asset, only when you restart Houdini or put down a new instance of the asset. This is because PreFirstCreate is executed while a hip file is loading.

Note

Do not create a script (on the Scripts tab) and an extra file (on the Extra files tab) with the same name. The two tabs share a single namespace, and unpredictable behavior may result.

Adding and loading scripts

To...Do this
Start a new event script
  1. Choose the event type from the Event handler pop-up menu.

    Choosing an event type (other than Custom script) will create a “section” for the script if it doesn’t already exist.

  2. Use the editor on the right side of the pane to write the script. The pop-up menu at the bottom controls whether the script is Python, HScript, or expressions.

Load an existing file as an event script
  1. Choose the event type from the Event handler pop-up menu.

    Choosing an event type (other than Custom script) will create a “section” for the script if it doesn’t already exist.

  2. Enter the filename for the script file to load in the Filename field.

  3. Click Add file.

A copy of the file is saved into the digital asset. If you change the file on disk, it will not affect the version in the asset. You will have to reload the file into the Scripts tab.

Add a python module

The PythonModule section serves as a central place for Python values, classes, and functions related to the asset. The only thing that’s special about it compared to any other embedded file is that it’s returned by the node.hdaModule() method, which makes it convenient to access in scripts.

  1. Click Event handler and choose Python module.

  2. Do one of the following

    • If you have a file on disk you want to load as the module contents, enter it in the Filename field, then click Add file.

    • Use the editor on the right side of the pane to write the module contents.

Add a custom script
  1. Click Event handler and choose Custom script.

  2. Enter a Section name for the script. This is how you will refer to the custom script within Houdini.

  3. Do one of the following

    • If you have a file on disk you want to load as the custom script, enter it in the Filename field, then click Add file.

    • If you want to start the script from scratch in the editor, click Add empty section.

See how to reference embedded files for information on how to refer to the embedded scripts wherever Houdini expects a filename.

Writing event scripts

Event Scripts can be created on disk to override scripts embedded in an HDA. There are also global event scripts for each event type, which are run for all node instances, regardless of type. Spare parameters can also be added to any node, which add event processing on a per-node basis. For any given change, all global, optype, and node event scripts are run. All scripts can be either HScript or Python scripts.

  • In Python, the script has a kwargs variable containing a dictionary of named arguments. To see the contents of the dictionary, you can use the following:

      hou.ui.displayMessage(repr(kwargs))
      
  • In HScript, the On Created, On Loaded, On Updated, On Deleted, On Input Changed, and On Name Changed event scripts are called with two arguments.

    $arg0

    Contains an opdef: style asset file specification for the event: the operator class name and operator type name separated by a slash (/) followed by a question mark (?) and the name of the event type, for example:

            opdef:/Object/my_asset?OnCreated
            
    $arg1

    The full path of the node instance that triggered the event. For example:

            /obj/my_asset1
            

    You can check the contents of these arguments when you're debugging your scripts using the message command, which just pops up a message window:

        message $arg0
        

    For the Before First Create and After Last Delete events, the first argument is the same, but the second argument $arg1 returns the operator class name and the operator type name separated by a slash (/), for example Object/my_asset.

The following events can trigger scripts:

Before First Create

Runs when the first instance of this operator type is created in a hip file. Runs before the node is created, and runs even if the operator is created while loading a hip file. To determine if Houdini is in the process of loading a hip file, use the opisloading expression function.

You can use this script to set up the external environment for your asset, such as copying texture maps to a required location or setting environment variables.

The user cannot undo the actions performed in this script. Use the After Last Delete script to undo any actions performed by this script.

On Created

Runs after a new instance of this operator is created. Runs after the creation script and after the default parameter values are set. This script does not run when loading a hip file, only when the user creates a new node interactively.

On Loaded

Runs after the node is loaded.

On Updated

Runs when the definition for this operator is updated. Runs once for each instance of the operator in the hip file.

On Deleted

Runs immediately before Houdini deletes a node of this type. Runs before the node’s individual delete script.

To determine if Houdini is in the process of quitting a hip file, use the opisquitting expression function.

After Last Delete

Runs after the last node of this type is deleted from the hip file.

You can use this script to clean up any actions performed in the “Before First Create” event script.

The user cannot undo actions performed in this script.

To determine if Houdini is in the process of quitting a hip file, use the opisquitting expression function.

On Input Changed

Runs after an input connection to a node of this type is changed.

Houdini calls this script with the full path and class/type arguments described above, plus a third argument containing the index of the input connection that changed.

On Name Changed

Runs after the name of a node of this type is changed.

In addition to the full path and class/type arguments described above, this script is called with a third argument containing the old name of the node.

Sync Node Version

Runs after a node’s parameters are loaded and resolved but before On Loaded or On Updated. It is also run when invoking the opparm -V HScript command or hou.Node.syncNodeVersionIfNeeded method.

In addition to the full path and class/type arguments described above, this script is called with the current and old node version strings, respectively. For python, the arguments will be named old_version and current_version.

The purpose of this script is so that we can upgrade nodes which were created with an older version of the asset definition to the current version by changing its parameter values.

Created is when a new instance is created using opadd or by putting down a node in a network editor. It is run right after the creation script, but was made a separate script because the creation script often contains the node contents, and is modified by the Type Properties dialog, and so should not be edited directly by the user. Also of note is that the Created script is not run if you do “opadd -n” (which also stops the running of the creation script).

Loaded is when the node is loaded from a hip file. This includes copy/pasting nodes or networks but not when loading the node as part of the contents of another HDA. Because of the locking of nodes inside an HDA, the functionality of Loaded scripts for nodes inside a locked HDA should be made part of the Loaded script for the HDA itself. This script is run for each node after the whole hip file is loaded.

When the Loaded script is run, the Created script will not be run, and vice versa.

Tools

This tab lets you create a shelf tool associated with this asset. When the asset is loaded, the tools you define on this tab will be available for the user to add to the shelf, and will show up in the viewer tab menu.

Note

Any tools you define on this tab will not automatically show up on the shelf whenever the asset is available. The user has to add the tools to the shelf, by right-clicking the shelf and choosing Edit Shelf Tab, then choosing the tools from a list of all available tools.

When you create an asset, Houdini automatically adds a tool to this tab, that invokes a generic script to create an instance of the asset. You can edit the script of this tool, or add additional shelf tools to provide alternate ways of instantiating the asset. Click Create New and choose Tool to start a new tool.

See how to create shelf tools.

Selectors tab

This tab lets you set up the selection prompts shown to the user when creating the digital asset (or when the Reselect geometry button is pressed).

Changes to the selector bindings will affect all existing and future versions of this operator type. Selectors can be added, deleted or re-ordered using the list displayed on the left hand side. When a selector is selected from the list, it’s bindings and properties can be edited using the controls on the right.

The Type field is not editable and reflects the basic type of the selector. The Name field is the english name which should uniquely define this selector with respect to the operator type. The Prompt field displays the string during the selection process. The Multi-selection checkbox indicates whether or not multiple object selections are allowed for the current selector. The editable text field allows for a user-defined script to be executed when object selections are binded. The input objects are accessed by the variables $argc, and $arg0, $arg1,..., $arg($argc-1), where $argc is the number of inputs and the remaining variables represent each of the input objects.

Note

There is no variable which holds a path to your current node; however, you can retrieve the current node using the pwd HScript command.

For example, you can wire in the first selected input into your current node by doing the following:

    set curNode = `run("pwd")`
    opwire -n $arg0 -1 $curNode
    

Input/Output tab

In this tab, you can give the operator inputs and outputs user friendly labels. The label appears when you press MMB on an input.

The first table describes all inputs to the VOP. The second table describes the outputs.

To add a new input or output connection, select the data type of the new connection from the New Input or New Output menu. You can edit the name, label, or data type of an existing input or output by changing the value directly in the table. Simply click on the value you would like to change. You can also delete inputs and outputs using the buttons found down the left edge of each table.

To reorder inputs, select the input header (i.e. cell in first column) to select the row and then drag the row to the desired position. You can select multiple rows with ⇧ Shift + LMB or Ctrl + LMB on the row header and move multiple selected rows with a single drag. Similarly, you can reorder signatures by selecting the column headers (i.e. cells in first row) and dragging the columns to the desired position.

Usually it is a good idea to provide a parameter (see the Parameters tab) with the same name as each input. When you do this, if that input does not get connected, the VEX Builder will automatically use the value of the parameter with the same name in place of the input value.

When a VOP operator appears in a VOP network, the VEX Builder will only include the code generated by that operator if it determines that its code is required. Generally, this is true for subnet type VOPs, the Output VOP, and any VOP that is connected, directly or indirectly, to the input of a VOP that has required code. However, you can force the VEX Builder to generate the code for your VOP by turning on the Force Code Generation toggle.

VOP operators are also allowed to have a variety of signatures. A signature provides an alternate set of data types for each input and output. By default, a new VOP operator has only one signature. To create a new signature, press the New Signature button. The new signature will be created with a default name and description, and with the same data types for all inputs and outputs as the previous signature. The description of the signature appears in the Signature menu in the VOP’s parameter dialog. The signature name is used to determine which VOP parameter to use as the default value if the input is not connected. To provide a default parameter to use for a particular signature, create a parameter with the same name as the input, followed by an underscore, then the name of the signature.

For example, suppose you have two inputs, color and multiplier, which have the data types vector4 and float. You would create two parameters, also called color and multiplier. The first would be a Color parameter, and the second a single float parameter. Now you want to allow multiplier to also be a vector4. Create a new signature, and name it v4. Change the data type of multiplier for that signature to vector4. The create a new parameter named multiplier_v4, which is 4 floats. Now when one of these operator is created, and the signature is set to v4, the VEX Builder will use the color and multiplier_v4 parameters to provide the default values.

Procedural Shader

Indicates whether the VOP is implemented by a DSO or DLL file instead of code generated by the VEX Builder.

Create/Update Inputs from Parameter

Automatically generates inputs from the parameters defined on the Parameters tab. Inputs will be created with the same name and label, and the type will be guessed from the parameter type. If an input is already defined with the same name as a parameter, only the label will be updated so that manual changes to the input type will be retained after updating parameters.

Visible Column

This column is present when editing a VOP Asset. It is the default value for whether inputs are visible or not, which is customized on a per-node basis by clicking LMB on the icons next to the corresponding VOP parameters.

Extra Files tab (advanced)

To...Do this
Add a new file to the definition
  1. Type the filename in the File name field, or click the + button next to the field to choose the file.

  2. Section name is the name of the file inside the OTL. It defaults to the base name of the file (that is, the file name without any path information). You can edit it to give the file a different name inside the OTL.

  3. Click Add File.

Edit the contents of a text file
  1. Select the file in the section list to show its contents in the text editor on the right, along with the size and time stamp of the section.

  2. Edit the contents in the text editor.

  3. Click Apply.

Edit the contents of a binary file
  1. Select the file in the section list.

  2. Click Save As File in the lower right to save the contents of the section as a file on disk.

  3. Edit the saved file.

  4. Add the file back into the OTL with the same section name to replace the old binary using Add File.

Delete a file
  • Click the X button next to the file’s name in the section list.

Tip

Any sections you've modified (either by changing them in the editor, or because they're newly added) will have an asterisk in the section list.

Predefined variables in callback scripts

In embedded scripts you want to use as parameter callbacks , the name of the changed parameter is available in $script_parm, and the value is in $script_value. If the parameter has multiple components, you can access them as $script_value0, $script_value1, and so on.

See the description of the Callback field on the operator type properties window Parameters tab for more information.

Accessing embedded files

Once you have embedded files into the operator type definition, you can access these embedded files from many places within Houdini. Geometry or channel files can be accessed from File SOPs or File CHOPs. Image files can be used as texture map files specified in VEX SHOPs. Script files can be accessed from the textport or parameter callbacks using the source command.

To access one of these embedded files, wherever a file name is called for, use the following:

opdef:/Network_type/asset_name?section

For example:

opdef:/Shop/v_clay?DialogScript

To refer to the current operator, use

opdef:.?section

The opdef syntax always accesses the currently used definition for an operator.

You can also access an embedded file from another asset in the same library (.otl file). To do so use:

oplib:/Network_type/asset_name?Network_type2/asset_name2?section

The second operator type should exist in the same library that provides the active definition for the first operator type.

On this page

Related topics